<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="hieu.dao" />
    <meta charset="UTF-8" />
	<title>PHP Examples</title>
</head>
<body>
<?php
require_once ("Database.php");
$config["hostname"] = '192.168.10.186'; // Host name
$config["userdb"] = 'root'; // Username database
$config["passdb"] = 'vtcsoft'; // Password database
$config["dbname"] = 'wordpress'; // Name database
$db = new Database($config);
$query = "SELECT * FROM wp_posts;";
$db->query($query);
echo '<ul>';
while ($rows = $db->fetch()) {
    echo '<li>' . $rows['post_id'] . ' - ' . $rows['post_title'] . '</li>';
}
echo '<li>Num rows: ' . $db->num_rows() . '</li>';
echo '</ul>';
?>
</body>
</html>